%% about
% this file generates Table 4: Decomposition of real bond risk premium

clc
clear all
load run1a_baseline_sr.mat

%% print model implied values

fprintf('Unconditional:\n')
fprintf('Aggregate consumption: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_uncond.cons_term))
fprintf('Income dispersion: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_uncond.zeta_term))
fprintf('Cross-covariance: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_uncond.cross_term))
fprintf('Bond risk premium: %g\n', 100*mean(stats.bond_risk_prem_real_uncond))

fprintf('Low productivity:\n')
fprintf('Aggregate consumption: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z1.cons_term))
fprintf('Income dispersion: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z1.zeta_term))
fprintf('Cross-covariance: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z1.cross_term))
fprintf('Bond risk premium: %g\n', 100*mean(stats.bond_risk_prem_real_z1))

fprintf('High productivity:\n')
fprintf('Aggregate consumption: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z2.cons_term))
fprintf('Income dispersion: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z2.zeta_term))
fprintf('Cross-covariance: %g\n', 100*mean(stats.bond_risk_prem_real_decomp_z2.cross_term))
fprintf('Bond risk premium: %g\n', 100*mean(stats.bond_risk_prem_real_z2))